﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WareHouse.Service.MapperProfile
{
    using AutoMapper;

    using WareHouse.Contract.Common;
    using WareHouse.Contract.Models;
    using WareHouse.Data;
    
    public class InitialMapper 
    {
        public InitialMapper()
        {
            // Agency Profile
            Mapper.CreateMap<Agency, AgencyModel>();
            Mapper.CreateMap<AgencyModel, Agency>();

            // Customer debt rate Profile
            Mapper.CreateMap<CustomerDebtRate, CustomerDebtRateModel>();
            Mapper.CreateMap<CustomerDebtRateModel, CustomerDebtRate>();

            // Customer  Profile
            Mapper.CreateMap<Customer, CustomerModel>();
            Mapper.CreateMap<CustomerModel, Customer>();

            // Department Profile
            Mapper.CreateMap<Department, DepartmentModel>();
            Mapper.CreateMap<DepartmentModel, Department>();

            // employer Profile
            Mapper.CreateMap<Employer, EmployerModel>();
            Mapper.CreateMap<EmployerModel, Employer>();

            // export detail  Profile
            Mapper.CreateMap<ExportDetail, ExportDetailModel>();
            Mapper.CreateMap<ExportDetailModel, ExportDetail>();


            // export Profile
            Mapper.CreateMap<Export, ExportModel>();
            Mapper.CreateMap<ExportModel, Export>();

            // import detail Profile
            Mapper.CreateMap<ImportDetail, ImportDetailModel>();
            Mapper.CreateMap<ImportDetailModel, ImportDetail>();

            // import  Profile
            Mapper.CreateMap<Import, ImportModel>();
            Mapper.CreateMap<ImportModel, Import>();

            // item Profile
            Mapper.CreateMap<Item, ItemModel>();
            Mapper.CreateMap<ItemModel, Item>();

            // itemprice Profile
            Mapper.CreateMap<ItemPrice, ItemPriceModel>();
            Mapper.CreateMap<ItemPriceModel, ItemPrice>();

            // item type   Profile
            Mapper.CreateMap<ItemType, ItemTypeModel>();
            Mapper.CreateMap<ItemTypeModel, ItemType>();

            // unit Profile
            Mapper.CreateMap<Unit, UnitModel>();
            Mapper.CreateMap<UnitModel, Unit>();

            // warehouse Profile
            Mapper.CreateMap<WareHouse, WareHouseModel>();
            Mapper.CreateMap<WareHouseModel, WareHouse>();

            // warehouse type   Profile
            Mapper.CreateMap<WareHouseType, WareHouseTypeModel>();
            Mapper.CreateMap<WareHouseTypeModel, WareHouseType>();


            // UserAccount   Profile
            Mapper.CreateMap<UserAccount, UserAccountModel>();
            Mapper.CreateMap<UserAccountModel, UserAccount>();

            // Detail warehouse profile
            Mapper.CreateMap<DetailItemWareHouse, DetailItemWareHouseModel>();
            Mapper.CreateMap<DetailItemWareHouseModel, DetailItemWareHouse>();

            // Export History
            Mapper.CreateMap<ExportHistory, ExportHistoryModel>();
            Mapper.CreateMap<ExportHistoryModel, ExportHistory>();

            // Detail Customer Paid History Model
            Mapper.CreateMap<DetailCustomerPaidHistory, DetailCustomerPaidHistoryModel>();
            Mapper.CreateMap<DetailCustomerPaidHistoryModel, DetailCustomerPaidHistory>();

            Mapper.CreateMap<CustomerPaidHistory, CustomerPaidHistoryModel>();
            Mapper.CreateMap<CustomerPaidHistoryModel, CustomerPaidHistory>();

            // Agency Profile
            Mapper.CreateMap<Company, CompanyModel>();
            Mapper.CreateMap<CompanyModel, Company>();


            // Order Profile
            Mapper.CreateMap<Order, OrderModel>();
            Mapper.CreateMap<OrderModel, Order>();


            // Order Detail Profile
            Mapper.CreateMap<OrderDetail, OrderDetailModel>();
            Mapper.CreateMap<OrderDetailModel, OrderDetail>();

            // Order Detail Profile
            Mapper.CreateMap<GroupUser, GroupUserModel>();
            Mapper.CreateMap<GroupUserModel, GroupUser>();

            // Detail GroupUser Role Profile
            Mapper.CreateMap<Detail_GroupUserRole, DetailGroupUserRoleModel>();
            Mapper.CreateMap<DetailGroupUserRoleModel, Detail_GroupUserRole>();

        }
    }
}
